package cn.jsj.hzu.qm.facecloud.user.service.impl;

import java.util.List;

import org.springframework.jdbc.core.JdbcTemplate;

import cn.jsj.hzu.qm.facecloud.user.dao.UserDao;
import cn.jsj.hzu.qm.facecloud.user.pojo.User;
import cn.jsj.hzu.qm.facecloud.user.service.UserService;

public class UserServiceImpl implements UserService {

	UserDao userDao = null;
	
	@Override
	public int addUser(User user) {
		
		return userDao.addUser(user);
	}

	@Override
	public int deleteUser(User user) {
		
		return userDao.deleteUser(user);
	}

	@Override
	public int updateUser(User user) {
		
		return userDao.updateUser(user);
	}

	@Override
	public User findUserById(int id) {
		
		return userDao.findUserById(id);
	}

	@Override
	public User findUserByEmail(String email) {
		return userDao.findUserByEmail(email);
		
	}

	@Override
	public List<User> findAllUsers() {
		return userDao.findAllUsers();
		
	}
	
	public UserDao getUserDao() {
		return userDao;
	}
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public int getAllUserNum() {
		return userDao.getAllUserNum(); 
	}
}
